<?php
 /**
 * Author: Jason ZHENG
 * Date: 2018-05-17
 * Class: ReturnData 用于返回统一数据格式
 * 
 * 
 */
namespace app\members\controller;

class ReturnData
{
    static public function error($code, $msg="", $data=[])
    {
        return [
            "code"=>$code,
            "msg"=> "错误:  ". $msg,
            "data"=>$data
        ];
    }


    static public function ok($data=[])
    {
        return [
            "code"=>666,
            "msg"=> "OK",
            "data"=>$data
        ];
    }

}